package com.gimi.cloud.jimi.app.consumer.feign;

import com.gimi.cloud.jimi.app.consumer.feign.hystrix.OrderHystrix;
import com.gimi.cloud.jimi.dto.order.OrderDTO;
import com.gimi.cloud.jimi.dto.order.ReplantDTO;
import com.gimi.cloud.jimi.dto.params.OrderParams;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shazhiwei on 2018/1/9.
 */
@FeignClient(name = "jimi-app-service", fallback = OrderHystrix.class)
public interface OrderFeignService {

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "order/addOrder", method = RequestMethod.POST)
    String addOrder(@RequestBody OrderParams param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "order/getDataStatus", method = RequestMethod.POST)
    String getDataStatus(@RequestBody OrderParams param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "order/getOrderList", method = RequestMethod.POST)
    String getOrderList(@RequestBody OrderParams param);
    
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "order/getOrderDetail", method = RequestMethod.POST)
    String getOrderDetail(@RequestBody OrderParams param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "order/getReplantDetail", method = RequestMethod.POST)
    String getReplantDetail(@RequestBody ReplantDTO replantDTO);
    
}
